**SI 5
**Data: withstates2.dta
**Variables: main variables
**Additional variables: states

**SI Figure 5.1a
use "withstates2.dta"
**Residuals generated via main model in text (also shown in SI 1)
reg pctelect1 i.balance01##c.prof termlim  tleffect redist  mmds chpart fraction divgov unemployment pres2  
predict resid, residuals
**Each panel in Figure 5.1a generated as follows:
scatter resid ID3 if year==1982, title("1982", color(black)) mlabel(state) ylabel(4(1)-4) xlabel(none) xtitle("")  graphregion(fcolor(white)) mcolor(black) mlabcolor(black) 
graph save Graph "SI51afig1982.gph", replace

scatter resid ID3 if year==1984, title("1984", color(black)) mlabel(state) ylabel(4(1)-4) xlabel(none) xtitle("")  graphregion(fcolor(white)) mcolor(black) mlabcolor(black) 
graph save Graph "SI51afig1984.gph", replace

scatter resid ID3 if year==1986, title("1986", color(black)) mlabel(state) ylabel(4(1)-4) xlabel(none) xtitle("")  graphregion(fcolor(white)) mcolor(black) mlabcolor(black) 
graph save Graph "SI51afig1986.gph", replace

scatter resid ID3 if year==1988, title("1988", color(black)) mlabel(state) ylabel(4(1)-4) xlabel(none) xtitle("")  graphregion(fcolor(white)) mcolor(black) mlabcolor(black) 
graph save Graph "SI51afig1988.gph", replace

scatter resid ID3 if year==1990, title("1990", color(black)) mlabel(state) ylabel(4(1)-4) xlabel(none) xtitle("")  graphregion(fcolor(white)) mcolor(black) mlabcolor(black) 
graph save Graph "SI51afig1990.gph", replace

scatter resid ID3 if year==1992, title("1992", color(black)) mlabel(state) ylabel(4(1)-4) xlabel(none) xtitle("")  graphregion(fcolor(white)) mcolor(black) mlabcolor(black) 
graph save Graph "SI51afig1992.gph", replace

scatter resid ID3 if year==1994, title("1994", color(black)) mlabel(state) ylabel(4(1)-4) xlabel(none) xtitle("")  graphregion(fcolor(white)) mcolor(black) mlabcolor(black) 
graph save Graph "SI51afig1994.gph", replace

scatter resid ID3 if year==1996, title("1996", color(black)) mlabel(state) ylabel(4(1)-4) xlabel(none) xtitle("")  graphregion(fcolor(white)) mcolor(black) mlabcolor(black) 
graph save Graph "SI51afig1996.gph", replace

scatter resid ID3 if year==1998, title("1998", color(black)) mlabel(state) ylabel(4(1)-4) xlabel(none) xtitle("")  graphregion(fcolor(white)) mcolor(black) mlabcolor(black) 
graph save Graph "SI51afig1998.gph", replace

scatter resid ID3 if year==2000, title("2000", color(black)) mlabel(state) ylabel(4(1)-4) xlabel(none) xtitle("")  graphregion(fcolor(white)) mcolor(black) mlabcolor(black) 
graph save Graph "SI51afig2000.gph", replace

drop resid


**SI Figure 5.1b
use "withstates2.dta"
**Residuals generated via main model in text (also shown in SI 1)
reg pctelect1 i.balance01##c.prof termlim  tleffect redist  mmds chpart fraction divgov unemployment pres2 
predict resid, residuals
**Each panel in Figure 5.1b generated as follows:
qnorm resid if year==1982, title("1982", color(black)) mlabel(state) ylabel(4(2)-4) graphregion(fcolor(white)) mcolor(black) mlabcolor(black) rlop(lcolor(black))
graph save Graph "SI51bfig1982.gph", replace

qnorm resid if year==1984, title("1984", color(black)) mlabel(state) ylabel(4(2)-4) graphregion(fcolor(white)) mcolor(black) mlabcolor(black) rlop(lcolor(black))
graph save Graph "SI51bfig1984.gph", replace

qnorm resid if year==1986, title("1986", color(black)) mlabel(state) ylabel(4(2)-4) graphregion(fcolor(white)) mcolor(black) mlabcolor(black) rlop(lcolor(black))
graph save Graph "SI51bfig1986.gph", replace

qnorm resid if year==1988, title("1988", color(black)) mlabel(state) ylabel(4(2)-4) graphregion(fcolor(white)) mcolor(black) mlabcolor(black) rlop(lcolor(black))
graph save Graph "SI51bfig1988.gph", replace

qnorm resid if year==1990, title("1990", color(black)) mlabel(state) ylabel(4(2)-4) graphregion(fcolor(white)) mcolor(black) mlabcolor(black) rlop(lcolor(black))
graph save Graph "SI51bfig1990.gph", replace

qnorm resid if year==1992, title("1992", color(black)) mlabel(state) ylabel(4(2)-4) graphregion(fcolor(white)) mcolor(black) mlabcolor(black) rlop(lcolor(black))
graph save Graph "SI51bfig1992.gph", replace

qnorm resid if year==1994, title("1994", color(black)) mlabel(state) ylabel(4(2)-4) graphregion(fcolor(white)) mcolor(black) mlabcolor(black) rlop(lcolor(black))
graph save Graph "SI51bfig1994.gph", replace

qnorm resid if year==1996, title("1996", color(black)) mlabel(state) ylabel(4(2)-4) graphregion(fcolor(white)) mcolor(black) mlabcolor(black) rlop(lcolor(black))
graph save Graph "SI51bfig1996.gph", replace

qnorm resid if year==1998, title("1998", color(black)) mlabel(state) ylabel(4(2)-4) graphregion(fcolor(white)) mcolor(black) mlabcolor(black) rlop(lcolor(black))
graph save Graph "SI51bfig1998.gph", replace

qnorm resid if year==2000, title("2000", color(black)) mlabel(state) ylabel(4(2)-4) graphregion(fcolor(white)) mcolor(black) mlabcolor(black) rlop(lcolor(black))
graph save Graph "SI51bfig2000.gph", replace


